cmake_minimum_required(VERSION 3.10)

project(mnist)

add_compile_options(-std=c++17)

set(CMAKE_CXX_FLAGS_DEBUG "-fPIC -g -o0 -Wall -pedantic")
set(CMAKE_CXX_FLAGS_RELEASE "-fPIC -o2 -Wall")

add_definitions(-DENABLE_DVPP_INTERFACE)

add_executable(main main.cpp dataset.cpp) # 定义一个叫 main 的 target

target_include_directories(main PUBLIC ../include $ENV{INSTALL_DIR}/include)

target_link_directories(main PUBLIC $ENV{INSTALL_DIR}/runtime/lib64/stub)

target_link_libraries(main ascendcl)
